package com.wen.strategyPattern;

public class Test {
    public static void main(String[] args) {
        Strategy strategyA = new StrategyA();
        Strategy strategyB = new StrategyB();
        Context context = new Context(strategyA);
        context.handle();
        //此时根据业务右需要b算法进行操作
        context.setStrategy(strategyB);
        context.handle();
    }
}
